##############################################################
## MOD Title:           Anti Bot Question MOD
## MOD Author:          MagMo < N/A > (N/A) http://phpbb.mwegner.de/
##
## MOD Update:          2.0.1 -> 3.0.0
##
## Update Level:        Intermediate
## Update Time:         20 Minutes
##
##
## Files To Edit:       13
##      posting.php
##      admin/admin_users.php
##      includes/constants.php
##      includes/functions.php
##      includes/page_tail.php
##      includes/usercp_avatar.php
##      includes/usercp_register.php
##        language/lang_english/lang_admin.php
##      templates/subSilver/agreement.tpl
##      templates/subSilver/overall_footer.tpl
##      templates/subSilver/posting_body.tpl
##      templates/subSilver/profile_add_body.tpl
##      templates/subSilver/admin/user_edit_body.tpl
##
## Included Files:      39
##      abq_image.php
##      admin/abq_auto_quests.php
##      admin/abq_config.php
##      admin/abq_config2.php
##      admin/abq_fonts.php
##      admin/abq_indi_images.php
##      admin/abq_indi_quests.php
##      admin/abq_indig_quests.php
##      admin/abq_reset.php
##      admin/admin_anti_bot_question_index.php
##      images/abq_mod/admin/abq-button.gif
##      images/abq_mod/admin/attention.gif
##      images/abq_mod/cache/index.htm
##      includes/functions_abq.php
##      includes/functions_abq_image1.php
##      includes/functions_abq_image2.php
##      includes/functions_abq_image3.php
##      includes/functions_abq_image4.php
##      includes/functions_abq_upload.php
##        language/lang_english/lang_abq.php
##        language/lang_english/lang_abq_admin.php
##      templates/subSilver/admin/abq_auto_quests_body.tpl
##      templates/subSilver/admin/abq_config2_body.tpl
##      templates/subSilver/admin/abq_config_body.tpl
##      templates/subSilver/admin/abq_fonts_body.tpl
##      templates/subSilver/admin/abq_fonts_delete_body.tpl
##      templates/subSilver/admin/abq_fonts_example_body.tpl
##      templates/subSilver/admin/abq_fonts_upload_body.tpl
##      templates/subSilver/admin/abq_index_body.tpl
##      templates/subSilver/admin/abq_indi_images_body.tpl
##      templates/subSilver/admin/abq_indi_images_delete_body.tpl
##      templates/subSilver/admin/abq_indi_images_upload_body.tpl
##      templates/subSilver/admin/abq_indi_quests_body.tpl
##      templates/subSilver/admin/abq_indi_quests_delete_body.tpl
##      templates/subSilver/admin/abq_indi_quests_edit_body.tpl
##      templates/subSilver/admin/abq_indig_quests_body.tpl
##      templates/subSilver/admin/abq_indig_quests_delete_body.tpl
##      templates/subSilver/admin/abq_indig_quests_edit_body.tpl
##      templates/subSilver/admin/abq_reset_body.tpl
##
############################################################## 
## For security purposes, please check: http://www.phpbb.com/mods/ 
## for the latest version of this MOD. Although MODs are checked 
## before being allowed in the MODs Database there is no guarantee 
## that there are no security problems within the MOD. No support 
## will be given for MODs not found within the MODs Database which 
## can be found at http://www.phpbb.com/mods/ 
############################################################## 
## Or check: http://phpbb.mwegner.de/ for the latest version of this MOD. 
## Downloading this MOD from other sites could cause malicious code to enter 
## into your phpBB Forum.
############################################################## 
## Before updating this MOD, you should back up all files related to this update.
############################################################## 

##############################################################
##         UPDATE OF THE Anti Bot Question Mod              ##
##############################################################

#
#-----[ DIY INSTRUCTIONS ]--------------------------------------
#
# EN:
#    create following folder:
#
# DE:
#    folgendes Verzeichnis erstellen:
#
# FR:
#    Crez les rpertoires suivants:
#
# ES:
#    crear las siguientes carpetas:
#
#   images/abq_mod/cache
#
Create folder: images/abq_mod/cache

#
#-----[ DIY INSTRUCTIONS ]--------------------------------------
#
# EN:
#    change file system modes:
#
# DE:
#    Zugriffsrechte ndern:
#
# FR:
#    Changez les droits des fichiers suivants:
#
# ES:
#    cambiar file system modes (CHMOD):
#
#   CHMOD images/abq_mod/cache to 777
#
CHMOD images/abq_mod/cache to 777

# 
#-----[ DIY INSTRUCTIONS ]------------------------------------------------ 
#
# EN:
#    Delete the following Files from your Board.
# 
# DE:
#    Lsche die folgenden Dateien aus deinem Forumverzeichnis.
#
# FR:
#    Supprimez de votre forum les fichiers suivants.
#
# ES:
#    Borrar los siguientes ficheros de tu foro.
#

delete abq_bild.php
delete includes/functions_abq_bild1.php
delete includes/functions_abq_bild2.php
delete includes/functions_abq_bild3.php
delete images/abq_mod/admin/achtung.gif

# 
#-----[ COPY ]------------------------------------------------ 
#
# EN:
#    Copy all included Files to the right position into your Board.
#    The Structure into the "root" folder of this MOD is identically with the
#    Structure of a phpBB Board. So then you know where the Files have to be.
#
#    If you have installed more than one Template you have to upload
#    the included *.tpl files in the subSilver folder of this MOD
#    into the folders of every Template you have installed!
#
#    !!! Overwrite existing files !!!
# 
# DE:
#    Kopiere alle einzufgenden Dateien (Included Files) an die richtige Stelle in dein Forum.
#    Die Struktur des Verzeichnises "root" dieses MODs ist identisch mit der 
#    Struktur des phpBB Boards. So kannst du genau sehen wo die Dateien hin mssen.
#
#    Wenn du mehr als ein Template installiert hast, dann musst
#    du die ins subSilver-Verzeichnis einzufgenden *.tpl-Dateien 
#    in jedes Verzeichnis aller installierten Templates kopieren.
#
#    !!! Bestehende Dateien berschreiben !!!
#
# FR:
#    Copiez tous les fichiers inclus dans les rpertoires adquats. L'arborescence dans 
#    le dossier "root" est identique  la structure de votre forum phpBB. Ainsi vous savez o 
#    doivent aller les fichiers.
#
#    Si vous avez install plus d'un template, vous devez uploader les fichiers .tpl du 
#    rpertoire subSilver du MOD dans TOUS vos rpertoires thme!
#
# ES:
#    Copia todos los ficheros incluidos al lugar correcto en tu foro. La estructura
#    en la carpeta "root" en este MOD es idntica a la Estructura de un 
#    foro phpBB. As puedes saber donde va cada archivo.
#
#    Si tienes instalado ms de un Template/Estilo tienes que subir los archivos .tpl incluidos 
#    en en la carpeta subSilver de este MOD a las carpetas correspondientes de cada Template/Estilo 
#    que tienes instalado!
#

copy ../../root/abq_image.php to abq_image.php
copy ../../root/admin/abq_auto_quests.php to admin/abq_auto_quests.php
copy ../../root/admin/abq_config.php to admin/abq_config.php
copy ../../root/admin/abq_config2.php to admin/abq_config2.php
copy ../../root/admin/abq_fonts.php to admin/abq_fonts.php
copy ../../root/admin/abq_indi_images.php to admin/abq_indi_images.php
copy ../../root/admin/abq_indi_quests.php to admin/abq_indi_quests.php
copy ../../root/admin/abq_indig_quests.php to admin/abq_indig_quests.php
copy ../../root/admin/abq_reset.php to admin/abq_reset.php
copy ../../root/admin/admin_anti_bot_question_index.php to admin/admin_anti_bot_question_index.php
copy ../../root/images/abq_mod/admin/abq-button.gif to images/abq_mod/admin/abq-button.gif
copy ../../root/images/abq_mod/admin/attention.gif to images/abq_mod/admin/attention.gif
copy ../../root/images/abq_mod/cache/index.htm to images/abq_mod/cache/index.htm
copy ../../root/includes/functions_abq.php to includes/functions_abq.php
copy ../../root/includes/functions_abq_image1.php to includes/functions_abq_image1.php
copy ../../root/includes/functions_abq_image2.php to includes/functions_abq_image2.php
copy ../../root/includes/functions_abq_image3.php to includes/functions_abq_image3.php
copy ../../root/includes/functions_abq_image4.php to includes/functions_abq_image4.php
copy ../../root/includes/functions_abq_upload.php to includes/functions_abq_upload.php

copy ../../root/language/lang_english/lang_abq.php to language/lang_english/lang_abq.php
copy ../../root/language/lang_english/lang_abq_admin.php to language/lang_english/lang_abq_admin.php

copy ../../root/templates/subSilver/admin/abq_auto_quests_body.tpl to templates/subSilver/admin/abq_auto_quests_body.tpl
copy ../../root/templates/subSilver/admin/abq_config2_body.tpl to templates/subSilver/admin/abq_config2_body.tpl
copy ../../root/templates/subSilver/admin/abq_config_body.tpl to templates/subSilver/admin/abq_config_body.tpl
copy ../../root/templates/subSilver/admin/abq_fonts_body.tpl to templates/subSilver/admin/abq_fonts_body.tpl
copy ../../root/templates/subSilver/admin/abq_fonts_delete_body.tpl to templates/subSilver/admin/abq_fonts_delete_body.tpl
copy ../../root/templates/subSilver/admin/abq_fonts_example_body.tpl to templates/subSilver/admin/abq_fonts_example_body.tpl
copy ../../root/templates/subSilver/admin/abq_fonts_upload_body.tpl to templates/subSilver/admin/abq_fonts_upload_body.tpl
copy ../../root/templates/subSilver/admin/abq_index_body.tpl to templates/subSilver/admin/abq_index_body.tpl
copy ../../root/templates/subSilver/admin/abq_indi_images_body.tpl to templates/subSilver/admin/abq_indi_images_body.tpl
copy ../../root/templates/subSilver/admin/abq_indi_images_delete_body.tpl to templates/subSilver/admin/abq_indi_images_delete_body.tpl
copy ../../root/templates/subSilver/admin/abq_indi_images_upload_body.tpl to templates/subSilver/admin/abq_indi_images_upload_body.tpl
copy ../../root/templates/subSilver/admin/abq_indi_quests_body.tpl to templates/subSilver/admin/abq_indi_quests_body.tpl
copy ../../root/templates/subSilver/admin/abq_indi_quests_delete_body.tpl to templates/subSilver/admin/abq_indi_quests_delete_body.tpl
copy ../../root/templates/subSilver/admin/abq_indi_quests_edit_body.tpl to templates/subSilver/admin/abq_indi_quests_edit_body.tpl
copy ../../root/templates/subSilver/admin/abq_indig_quests_body.tpl to templates/subSilver/admin/abq_indig_quests_body.tpl
copy ../../root/templates/subSilver/admin/abq_indig_quests_delete_body.tpl to templates/subSilver/admin/abq_indig_quests_delete_body.tpl
copy ../../root/templates/subSilver/admin/abq_indig_quests_edit_body.tpl to templates/subSilver/admin/abq_indig_quests_edit_body.tpl
copy ../../root/templates/subSilver/admin/abq_reset_body.tpl to templates/subSilver/admin/abq_reset_body.tpl

# 
#-----[ SQL ]-------------------------------------------------
# 
# EN:
#    Run the following SQL statement to update your phpBB database.
#    You can use phpMyAdmin or a similar tool to run this update.
#
#    IMPORTANT: If you have changed the table prefix from the default of phpBB2,
#     please be sure to replace phpbb with your prefix BEFORE running this update.
#
# DE:
#    Fhre folgende SQL-Anweisungen aus, um die phpBB-Datenbank zu anzupassen.
#    Dies kann mittels phpMyAdmin oder einem vergleichbaren Programm geschehen.
#
#    WICHTIG: Wenn du das Standard-Tabellenprfix von phpBB2 gendert hast,
#     dann ist es notwendig in allen SQLAnweisungen phpbb durch das neue Prfix auszutauschen.
#             Dies muss geschehen BEVOR die Anpassung ausgefhrt wird.
#
# FR:
#    Excutez les requtes suivantes afin de mettre  jour votre base de donnes.
#    Pour cela, vous pouvez utiliser phpMyAdmin ou un outil similaire.
#
#    IMPORTANT: Si vous n'utilisez pas un prfix de vos table par dfaut, assurez vous 
#     de remplacer "phpbb_" par votre prfix, AVANT d'excuter ces requtes.
#
# ES:
#    Ejecuta los siguientes commandos SQL para actualizar tu base de datos.
#    Puedes usar phpMyAdmin o un programa similar para realizar esta actualizacin.
#
#    IMPORTANTE: Si has cambiado el prefijo de las tablas phpBB2 a otro,
#     asegrate de haber cambiado phpbb por tu prefijo Antes de ejecutar 
#                esta actualizacin de tu base de datos.
#

CREATE TABLE phpbb_anti_bot_quest_regconfirm (
 confirm_id CHAR(32) NOT NULL,
 session_id CHAR(32) NOT NULL,
 start_time INT(11) NOT NULL,
 PRIMARY KEY (session_id) 
);

INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('lib_gd', '3');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('lib_ft', '2');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('agreed_variable_name', 'ab_var');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('agreed_variable_value', 'agreed');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('email_variable_name', 'ab_email');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('show_counter', '2');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('counter_vari', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('counter_quest_reg', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('counter_quest_post', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('multiimages', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('lockregister', '3');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('lockguestposts', '8');

ALTER TABLE phpbb_anti_bot_quest ADD imagequestion CHAR(1) NOT NULL;

ALTER TABLE phpbb_anti_bot_quest CHANGE id id MEDIUMINT(8) NOT NULL;

ALTER TABLE phpbb_anti_bot_quest_confirm ADD art CHAR(1) NOT NULL;
ALTER TABLE phpbb_anti_bot_quest_confirm ADD start_time INT(11) NOT NULL ;

ALTER TABLE phpbb_anti_bot_quest_confirm CHANGE farbe color CHAR(1) NOT NULL;
ALTER TABLE phpbb_anti_bot_quest_confirm CHANGE art whichform CHAR(1) NOT NULL;

UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_01' WHERE config_name = 'autofrage_01';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_02' WHERE config_name = 'autofrage_02';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_03' WHERE config_name = 'autofrage_03';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_04' WHERE config_name = 'autofrage_04';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_05' WHERE config_name = 'autofrage_05';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_06' WHERE config_name = 'autofrage_06';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_07' WHERE config_name = 'autofrage_07';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_08' WHERE config_name = 'autofrage_08';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_09' WHERE config_name = 'autofrage_09';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_10' WHERE config_name = 'autofrage_10';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_11' WHERE config_name = 'autofrage_11';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_12' WHERE config_name = 'autofrage_12';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_13' WHERE config_name = 'autofrage_13';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_14' WHERE config_name = 'autofrage_14';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_15' WHERE config_name = 'autofrage_15';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_16' WHERE config_name = 'autofrage_16';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_17' WHERE config_name = 'autofrage_17';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_18' WHERE config_name = 'autofrage_18';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_19' WHERE config_name = 'autofrage_19';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_20' WHERE config_name = 'autofrage_20';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_21' WHERE config_name = 'autofrage_21';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_22' WHERE config_name = 'autofrage_22';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_23' WHERE config_name = 'autofrage_23';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_24' WHERE config_name = 'autofrage_24';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_25' WHERE config_name = 'autofrage_25';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_26' WHERE config_name = 'autofrage_26';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_27' WHERE config_name = 'autofrage_27';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_28' WHERE config_name = 'autofrage_28';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_29' WHERE config_name = 'autofrage_29';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_30' WHERE config_name = 'autofrage_30';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_31' WHERE config_name = 'autofrage_31';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_32' WHERE config_name = 'autofrage_32';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_33' WHERE config_name = 'autofrage_33';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuestion_34' WHERE config_name = 'autofrage_34';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_Text_Question1_R' WHERE config_name = 'Color_F1_R';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_Text_Question1_G' WHERE config_name = 'Color_F1_G';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_Text_Question1_B' WHERE config_name = 'Color_F1_B';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_Text_Question2_R' WHERE config_name = 'Color_F2_R';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_Text_Question2_G' WHERE config_name = 'Color_F2_G';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_Text_Question2_B' WHERE config_name = 'Color_F2_B';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_SeparatingLines_R1' WHERE config_name = 'Color_SLines_R1';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_SeparatingLines_R2' WHERE config_name = 'Color_SLines_R2';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_SeparatingLines_G1' WHERE config_name = 'Color_SLines_G1';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_SeparatingLines_G2' WHERE config_name = 'Color_SLines_G2';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_SeparatingLines_B1' WHERE config_name = 'Color_SLines_B1';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_SeparatingLines_B2' WHERE config_name = 'Color_SLines_B2';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_FilledGrid_R1' WHERE config_name = 'Color_GridF_R1';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_FilledGrid_R2' WHERE config_name = 'Color_GridF_R2';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_FilledGrid_G1' WHERE config_name = 'Color_GridF_G1';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_FilledGrid_G2' WHERE config_name = 'Color_GridF_G2';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_FilledGrid_B1' WHERE config_name = 'Color_GridF_B1';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_FilledGrid_B2' WHERE config_name = 'Color_GridF_B2';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_Ellipses_R1' WHERE config_name = 'Color_Ellipsen_R1';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_Ellipses_R2' WHERE config_name = 'Color_Ellipsen_R2';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_Ellipses_G1' WHERE config_name = 'Color_Ellipsen_G1';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_Ellipses_G2' WHERE config_name = 'Color_Ellipsen_G2';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_Ellipses_B1' WHERE config_name = 'Color_Ellipsen_B1';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_Ellipses_B2' WHERE config_name = 'Color_Ellipsen_B2';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_PartialEllipses_R1' WHERE config_name = 'Color_TEllipsen_R1';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_PartialEllipses_R2' WHERE config_name = 'Color_TEllipsen_R2';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_PartialEllipses_G1' WHERE config_name = 'Color_TEllipsen_G1';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_PartialEllipses_G2' WHERE config_name = 'Color_TEllipsen_G2';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_PartialEllipses_B1' WHERE config_name = 'Color_TEllipsen_B1';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Color_PartialEllipses_B2' WHERE config_name = 'Color_TEllipsen_B2';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Ratio_Auto_Indi_Questions' WHERE config_name = 'verhaeltnis_eigene_auto';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Individuel_Questions' WHERE config_name = 'eigene_fragen';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'IndiQuests_CaseSensitive' WHERE config_name = 'ef_casesensitive';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'IndiQuests_ImagePHP' WHERE config_name = 'ef_bild';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuests_LargeNumbers' WHERE config_name = 'af_grossezahlen';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuests_MultiplicationSymbol' WHERE config_name = 'af_malzeichen';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'AutoQuests_MultipleChoise' WHERE config_name = 'af_use_select';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'ImageFormat' WHERE config_name = 'imagetype';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'JPG_Quality' WHERE config_name = 'jpgquality';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'max_Effects' WHERE config_name = 'afeff_max';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Effect_SeparatingLines' WHERE config_name = 'afeff_trennlinie';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Effect_BGText' WHERE config_name = 'afeff_bgtext';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Effect_Grid' WHERE config_name = 'afeff_grid';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Effect_GridWidth' WHERE config_name = 'afeff_gridw';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Effect_GridHeight' WHERE config_name = 'afeff_gridh';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Effect_FilledGrid' WHERE config_name = 'afeff_gridf';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Effect_Ellipses' WHERE config_name = 'afeff_ellipsen';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Effect_Arcs' WHERE config_name = 'afeff_boegen';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'Effect_Lines' WHERE config_name = 'afeff_linien';
UPDATE phpbb_anti_bot_quest_config SET config_name = 'abq_variable_name' WHERE config_name = 'postvariablename';

# 
#-----[ OPEN ]------------------------------------------------ 
# 
posting.php

# 
#-----[ FIND ]------------------------------------------------ 
# 
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_abq.' . $phpEx);
include($phpbb_root_path . 'includes/functions_abq.' . $phpEx);

$abq_config = array();
$sql = "SELECT *
	FROM " . ANTI_BOT_QUEST_CONFIG_TABLE;
if( !($result = $db->sql_query($sql)) )
{
	message_die(CRITICAL_ERROR, "Could not query anti bot question mod config information", "", __LINE__, __FILE__, $sql);
}

while ( $row = $db->sql_fetchrow($result) )
{
	$abq_config[$row['config_name']] = $row['config_value'];
}

# 
#-----[ REPLACE WITH ]------------------------------------------------ 
# 
include($phpbb_root_path . 'includes/functions_abq.' . $phpEx);

# 
#-----[ FIND ]------------------------------------------------ 
# 
			ABQ_AntwortPruefen('P');

# 
#-----[ REPLACE WITH ]------------------------------------------------ 
# 
			ABQ_CheckAnswer('Posting');

# 
#-----[ FIND ]------------------------------------------------ 
# 
$abq_CaseInfo = ABQ_FrageStellen('P');

# 
#-----[ REPLACE WITH ]------------------------------------------------ 
# 
$abq_CaseInfo = ABQ_AskQuestion('Posting');

# 
#-----[ FIND ]------------------------------------------------ 
# 
	// Anti Bot Question Mod - Start
	'L_ABQ_QUEST' => $abq_quest,
	'L_ABQ_EXPLAIN' => $lang['ABQ_F_explain_post'] . '<br />' . sprintf($lang['ABQ_F_Probleme'], '<a href="mailto:' . $board_config['board_email'] . '">', '</a>'),
	'L_ABQ_EXPLAIN2' => $lang['ABQ_F_explain_post2'],
	'L_ABQ_QUESTION' => $lang['ABQ_F_Question'],
	'L_ABQ_ANSWER' => $lang['ABQ_F_YourAnswer'],
	'L_ABQ_ANSWER_EXPLAIN' => (($abq_CaseInfo) && (substr($abq_answerfield,0,7) != '<select')) ? '<br />'.$lang['ABQ_F_casesensitive'] : '',
	'S_ABQ' => $abq_answerfield, 
	// Anti Bot Question Mod - End

# 
#-----[ REPLACE WITH ]------------------------------------------------ 
# 
	// Anti Bot Question Mod - Start
	'L_ABQ_QUEST' => $abq_quest,
	'L_ABQ_EXPLAIN' => $lang['ABQ_PostForm_explain'] . '<br />' . sprintf($lang['ABQ_Form_Problems'], '<a href="mailto:' . $board_config['board_email'] . '">', '</a>'),
	'L_ABQ_QUESTION' => $lang['ABQ_Form_Question'],
	'L_ABQ_ANSWER' => $lang['ABQ_Form_YourAnswer'],
	'L_ABQ_ANSWER_EXPLAIN' => (($abq_CaseInfo) && (substr($abq_answerfield,0,7) != '<select')) ? '<br />'.$lang['ABQ_Form_CaseSensitive'] : '',
	'S_ABQ' => $abq_answerfield, 
	// Anti Bot Question Mod - End

# 
#-----[ OPEN ]------------------------------------------------ 
# 
admin/admin_users.php

# 
#-----[ FIND ]------------------------------------------------ 
# 
		$email = ( !empty($HTTP_POST_VARS['email']) ) ? trim(strip_tags(htmlspecialchars( $HTTP_POST_VARS['email'] ) )) : '';

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
		// Anti Bot Question Mod - Start
		if ($abq_config['abq_register'])
		{
			$email = ( !empty($HTTP_POST_VARS[$abq_config['email_variable_name']]) ) ? trim(strip_tags(htmlspecialchars( $HTTP_POST_VARS[$abq_config['email_variable_name']] ) )) : '';
		}
		else
		{
			// Anti Bot Question Mod - End
			$email = ( !empty($HTTP_POST_VARS['email']) ) ? trim(strip_tags(htmlspecialchars( $HTTP_POST_VARS['email'] ) )) : '';
			// Anti Bot Question Mod - Start
		}
		// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------------ 
# 
			$s_hidden_fields = '<input type="hidden" name="mode" value="edit" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" /><input type="hidden" name="avatarcatname" value="' . $category . '" />';

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
			// Anti Bot Question Mod - Start
			if ($abq_config['abq_register'])
			{
				$s_hidden_fields = '<input type="hidden" name="mode" value="edit" /><input type="hidden" name="' . $abq_config['agreed_variable_name'] . '" value="' . $abq_config['agreed_variable_value'] . '" /><input type="hidden" name="coppa" value="' . $coppa . '" /><input type="hidden" name="avatarcatname" value="' . $category . '" />';
				$s_hidden_fields .= '<input type="hidden" name="' . $abq_config['email_variable_name'] . '" value="' . str_replace("\"", "&quot;", $email) . '" />';			}
			else
			{
				// Anti Bot Question Mod - End
				$s_hidden_fields = '<input type="hidden" name="mode" value="edit" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" /><input type="hidden" name="avatarcatname" value="' . $category . '" />';
				// Anti Bot Question Mod - Start
				$s_hidden_fields .= '<input type="hidden" name="email" value="' . str_replace("\"", "&quot;", $email) . '" />';
			}
			// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------------ 
# 
			$s_hidden_fields .= '<input type="hidden" name="email" value="' . str_replace("\"", "&quot;", $email) . '" />';

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
// ABQ Mod		$s_hidden_fields .= '<input type="hidden" name="email" value="' . str_replace("\"", "&quot;", $email) . '" />';

# 
#-----[ FIND ]------------------------------------------------ 
# 
		$s_hidden_fields = '<input type="hidden" name="mode" value="save" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" />';

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
		// Anti Bot Question Mod - Start
		if ($abq_config['abq_register'])
		{
			$s_hidden_fields = '<input type="hidden" name="mode" value="save" /><input type="hidden" name="' . $abq_config['agreed_variable_name'] . '" value="' . $abq_config['agreed_variable_value'] . '" /><input type="hidden" name="coppa" value="' . $coppa . '" />';
		}
		else
		{
			// Anti Bot Question Mod - End
			$s_hidden_fields = '<input type="hidden" name="mode" value="save" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" />';
			// Anti Bot Question Mod - Start
		}
		// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------------ 
# 
		$template->assign_vars(array(

# 
#-----[ BEFORE, ADD ]------------------------------------------------ 
# 
		// Anti Bot Question Mod - Start
		if ($abq_config['abq_register'])
		{
			$abq_email_variable_name = $abq_config['email_variable_name'];
		}
		else
		{
			$abq_email_variable_name = 'email';
		}
		// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------------ 
# 
			'EMAIL' => $email,

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
			// Anti Bot Question Mod - Start
			'S_ABQ_EMAIL' => $abq_email_variable_name,
			// Anti Bot Question Mod - End

# 
#-----[ OPEN ]------------------------------------------------ 
# 
includes/constants.php

# 
#-----[ FIND ]------------------------------------------------ 
# 
define('ANTI_BOT_QUEST_CONFIRM_TABLE', $table_prefix.'anti_bot_quest_confirm');

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
define('ANTI_BOT_QUEST_REGCONFIRM_TABLE', $table_prefix.'anti_bot_quest_regconfirm');

#
#-----[ OPEN ]------------------------------------------
#
includes/functions.php

# 
#-----[ FIND ]------------------------------------------------ 
# 
	global $nav_links;

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
	// Anti Bot Question Mod - Start
	global $abq_config;
	// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------------ 
# 
	include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx);

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
	// Anti Bot Question Mod - Start
	include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_abq.' . $phpEx);

	$abq_config = array();
	$sql = "SELECT *
		FROM " . ANTI_BOT_QUEST_CONFIG_TABLE;
	if( !($result = $db->sql_query($sql)) )
	{
		message_die(CRITICAL_ERROR, "Could not query anti bot question mod config information", "", __LINE__, __FILE__, $sql);
	}

	while ( $row = $db->sql_fetchrow($result) )
	{
		$abq_config[$row['config_name']] = $row['config_value'];
	}
	// Anti Bot Question Mod - End

#
#-----[ OPEN ]------------------------------------------
#
includes/page_tail.php

#
#-----[ FIND ]------------------------------------------
#
//
// Show the overall footer.
//

#
#-----[ AFTER, ADD ]------------------------------------------
#
// Anti Bot Question Mod - Start
if (($abq_config['abq_register']) || ($abq_config['abq_guest']))
{
	$abq_footer = $lang['ABQ_Footer'];
	if ($abq_config['show_counter'] == 1)
	{
		$abq_footer .= sprintf($lang['ABQ_Footer_Counter1'], ($abq_config['counter_vari'] + $abq_config['counter_quest_reg']));
	}
	elseif ($abq_config['show_counter'] == 2)
	{
		$abq_footer .= sprintf($lang['ABQ_Footer_Counter2'], ($abq_config['counter_vari'] + $abq_config['counter_quest_reg']), $abq_config['counter_quest_post']);
	}
	elseif ($abq_config['show_counter'] == 3)
	{
		$abq_footer .= sprintf($lang['ABQ_Footer_Counter3'], $abq_config['counter_quest_post']);
	}
	$template->assign_block_vars('switch_abq_footer', array());
	$template->assign_vars(array(
		'ABQ_FOOTER' => $abq_footer)
	);
}
// Anti Bot Question Mod - End

# 
#-----[ OPEN ]------------------------------------------------ 
# 
includes/usercp_avatar.php

# 
#-----[ FIND ]------------------------------------------------ 
# 
	global $board_config, $db, $template, $lang, $images, $theme;

# 
#-----[ IN-LINE FIND ]------------------------------------------------ 
# 
$theme

# 
#-----[ IN-LINE AFTER, ADD ]------------------------------------------------ 
# 
, $abq_config

# 
#-----[ FIND ]------------------------------------------------ 
# 
	$params = array('coppa', 'user_id', 'username', 'email', 'current_email', 'cur_password', 'new_password', 'password_confirm', 'icq', 'aim', 'msn', 'yim', 'website', 'location', 'occupation', 'interests', 'signature', 'viewemail', 'notifypm', 'popup_pm', 'notifyreply', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmilies', 'hideonline', 'style', 'language', 'timezone', 'dateformat');

	$s_hidden_vars = '<input type="hidden" name="sid" value="' . $session_id . '" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="avatarcatname" value="' . $category . '" />';

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
	// Anti Bot Question Mod - Start
	$params = array('coppa', 'user_id', 'username', 'current_email', 'cur_password', 'new_password', 'password_confirm', 'icq', 'aim', 'msn', 'yim', 'website', 'location', 'occupation', 'interests', 'signature', 'viewemail', 'notifypm', 'popup_pm', 'notifyreply', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmilies', 'hideonline', 'style', 'language', 'timezone', 'dateformat');

	if ($abq_config['abq_register'])
	{
		$params[] = $abq_config['email_variable_name'];
		$$abq_config['email_variable_name'] = $email;
		$s_hidden_vars = '<input type="hidden" name="sid" value="' . $session_id . '" /><input type="hidden" name="' . $abq_config['agreed_variable_name'] . '" value="' . $abq_config['agreed_variable_value'] . '" /><input type="hidden" name="avatarcatname" value="' . $category . '" />';
	}
	else
	{
		$params[] = 'email';
		// Anti Bot Question Mod - End
		$s_hidden_vars = '<input type="hidden" name="sid" value="' . $session_id . '" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="avatarcatname" value="' . $category . '" />';
		// Anti Bot Question Mod - Start
	}
	// Anti Bot Question Mod - End

# 
#-----[ OPEN ]------------------------------------------------ 
# 
includes/usercp_register.php

# 
#-----[ FIND ]------------------------------------------------ 
# 
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_abq.' . $phpEx);
include($phpbb_root_path . 'includes/functions_abq.' . $phpEx);

$abq_config = array();
$sql = "SELECT *
	FROM " . ANTI_BOT_QUEST_CONFIG_TABLE;
if( !($result = $db->sql_query($sql)) )
{
	message_die(CRITICAL_ERROR, "Could not query anti bot question mod config information", "", __LINE__, __FILE__, $sql);
}

while ( $row = $db->sql_fetchrow($result) )
{
	$abq_config[$row['config_name']] = $row['config_value'];
}

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
include($phpbb_root_path . 'includes/functions_abq.' . $phpEx);

# 
#-----[ FIND ]------------------------------------------------ 
# 
	global $userdata, $template, $lang, $phpbb_root_path, $phpEx;

# 
#-----[ IN-LINE FIND ]------------------------------------------------ 
# 
$phpEx

# 
#-----[ IN-LINE AFTER, ADD ]------------------------------------------------ 
# 
, $abq_config, $abq_agreedPart2

# 
#-----[ FIND ]------------------------------------------------ 
# 
		"U_AGREE_OVER13" => append_sid("profile.$phpEx?mode=register&amp;agreed=true"),
		"U_AGREE_UNDER13" => append_sid("profile.$phpEx?mode=register&amp;agreed=true&amp;coppa=true"))

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
		// Anti Bot Question Mod - Start
		"U_AGREE_OVER13" => append_sid("profile.$phpEx?mode=register&amp;" . (($abq_config['abq_register']) ? $abq_config['agreed_variable_name'] : "agreed") . "=" . (($abq_config['abq_register']) ? $abq_config['agreed_variable_value'] . $abq_agreedPart2 : "true")),
		"U_AGREE_UNDER13" => append_sid("profile.$phpEx?mode=register&amp;" . (($abq_config['abq_register']) ? $abq_config['agreed_variable_name'] : "agreed") . "=" . (($abq_config['abq_register']) ? $abq_config['agreed_variable_value'] . $abq_agreedPart2 : "true") . "&amp;coppa=true"))
		// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------------ 
# 
if ( $mode == 'register' && !isset($HTTP_POST_VARS['agreed']) && !isset($HTTP_GET_VARS['agreed']) )

# 
#-----[ BEFORE, ADD ]----------------------------------------
# 
// Anti Bot Question Mod - Start
$abq_agreedPart2 = '';

if (($abq_config['abq_register']) && ($mode == 'register'))
{
	$sql = 'DELETE FROM ' . ANTI_BOT_QUEST_REGCONFIRM_TABLE . ' 
		WHERE start_time < ' . (time() - (int) $board_config['session_length']) . ' 
		AND session_id <> \'' . $userdata['session_id'] . '\'';
	if (!$db->sql_query($sql))
	{
		message_die(GENERAL_ERROR, 'Could not delete stale anti bot question data', '', __LINE__, __FILE__, $sql);
	}
	$db->sql_freeresult($result);

	$sql = 'SELECT confirm_id 
		FROM ' . ANTI_BOT_QUEST_REGCONFIRM_TABLE . ' 
		WHERE session_id = \'' . $userdata['session_id'] . '\'';
	if (!($result = $db->sql_query($sql)))
	{
		message_die(CRITICAL_ERROR, "Could not query anti bot question mod registration information", "", __LINE__, __FILE__, $sql);
	}
	if ($db->sql_numrows($result) > 0)
	{
		while ($row = $db->sql_fetchrow($result))
		{
			$abqrow = $row;
		}
		$abq_agreedPart2 = $abqrow['confirm_id'];
	}
	if ($abq_agreedPart2 == '')
	{
		$abq_agreedPart2 = md5(uniqid($user_ip));

		$sql = 'INSERT INTO ' . ANTI_BOT_QUEST_REGCONFIRM_TABLE . ' (confirm_id, session_id, start_time) 
			VALUES (\'' . $abq_agreedPart2 . '\', \'' . $userdata['session_id'] . '\', ' . time() . ')';
		if (!$db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Could not insert new anti bot question registration information', '', __LINE__, __FILE__, $sql);
		}

	}
	elseif ((!isset($HTTP_POST_VARS[$abq_config['agreed_variable_name']])) && (!isset($HTTP_GET_VARS[$abq_config['agreed_variable_name']])))
	{
		$abq_agreedPart2 = md5(uniqid($user_ip));

		$sql = 'UPDATE ' . ANTI_BOT_QUEST_REGCONFIRM_TABLE . ' 
			SET confirm_id = \'' . $abq_agreedPart2 . '\', 
			start_time = ' . time() . ' 
			WHERE session_id = \'' . $userdata['session_id'] . '\'';
		if ( !($result = $db->sql_query($sql)) )
		{
			message_die(GENERAL_ERROR, 'Could not update anti bot question registration information', '', __LINE__, __FILE__, $sql);
		}
	}

	if (((isset($HTTP_POST_VARS[$abq_config['agreed_variable_name']])) && ($HTTP_POST_VARS[$abq_config['agreed_variable_name']] == $abq_config['agreed_variable_value'].$abq_agreedPart2)) || ((isset($HTTP_GET_VARS[$abq_config['agreed_variable_name']])) && ($HTTP_GET_VARS[$abq_config['agreed_variable_name']] == $abq_config['agreed_variable_value'].$abq_agreedPart2)))
	{}
	else
	{
		if ((isset($HTTP_POST_VARS['agreed'])) || (isset($HTTP_GET_VARS['agreed'])) || (isset($HTTP_POST_VARS['email'])))
		{
			$sql = 'SELECT *
				FROM ' . ANTI_BOT_QUEST_CONFIG_TABLE . ' 
				WHERE config_name = \'counter_vari\'';
			if( !($result = $db->sql_query($sql)) )
			{
				message_die(CRITICAL_ERROR, "Could not query anti bot question mod counter information", "", __LINE__, __FILE__, $sql);
			}
			while ( $row = $db->sql_fetchrow($result) )
			{
				$abq_counter_vari = $row['config_value'];
			}
			$abq_counter_vari++;

			$sql = 'UPDATE ' . ANTI_BOT_QUEST_CONFIG_TABLE . ' SET 
				config_value = \'' . $abq_counter_vari . '\' 
				WHERE config_name = \'counter_vari\'';
			if( !$db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, "Failed to update anti bot question mod counter", "", __LINE__, __FILE__, $sql);
			}
		}

		$template->assign_vars(array(
			"META" => '<meta name="robots" content="noindex,nofollow" /><meta name="robots" content="noarchive" /><meta http-equiv="expires" content="0" /><meta http-equiv="pragma" content="no-cache" />')
		);
		include($phpbb_root_path . 'includes/page_header.'.$phpEx);
		show_coppa();
		include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
	}
}
elseif (!$abq_config['abq_register'])
// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------------ 
# 
		$current_email = trim(htmlspecialchars($HTTP_POST_VARS['current_email']));
	}

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
	// Anti Bot Question Mod - Start
	if ($abq_config['abq_register'])
	{
		$abq_email_variable_name = $abq_config['email_variable_name'];
	}
	else
	{
		$abq_email_variable_name = 'email';
	}
	// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------------ 
# 
	$strip_var_list = array('email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests', 'confirm_code' => 'confirm_code', 'abq_aw' => $abq_config['postvariablename'], 'idabq' => 'idabq');

# 
#-----[ IN-LINE FIND ]------------------------------------------------ 
# 
'email' => 'email'

# 
#-----[ IN-LINE REPLACE WITH ]------------------------------------------------ 
# 
'email' => $abq_email_variable_name

# 
#-----[ IN-LINE FIND ]------------------------------------------------ 
# 
$abq_config['postvariablename']

# 
#-----[ IN-LINE REPLACE WITH ]------------------------------------------------ 
# 
$abq_config['abq_variable_name']

# 
#-----[ FIND ]------------------------------------------------ 
# 
	ABQ_AntwortPruefen('R');

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
	ABQ_CheckAnswer('Registration');

# 
#-----[ FIND ]------------------------------------------------ 
# 
//
// Default pages
//

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
// Anti Bot Question Mod - Start
$template->assign_vars(array(
	"META" => '<meta name="robots" content="noindex,nofollow" /><meta name="robots" content="noarchive" /><meta http-equiv="expires" content="0" /><meta http-equiv="pragma" content="no-cache" />')
);
// Anti Bot Question Mod - Ende

# 
#-----[ FIND ]------------------------------------------------ 
# 
	$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" />';

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
	// Anti Bot Question Mod - Start
	if ($abq_config['abq_register'])
	{
		$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="' . $abq_config['agreed_variable_name'] . '" value="' . $abq_config['agreed_variable_value'] . $abq_agreedPart2 . '" /><input type="hidden" name="coppa" value="' . $coppa . '" />';
	}
	else
	{
		// Anti Bot Question Mod - End
		$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" />';
		// Anti Bot Question Mod - Start
	}
	// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------------ 
# 
		$abq_CaseInfo = ABQ_FrageStellen('R');

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
		$abq_CaseInfo = ABQ_AskQuestion('Registration');

# 
#-----[ FIND ]------------------------------------------------ 
# 
	$form_enctype = ( @$ini_val('file_uploads') == '0' || strtolower(@$ini_val('file_uploads') == 'off') || phpversion() == '4.0.4pl1' || !$board_config['allow_avatar_upload'] || ( phpversion() < '4.0.3' && @$ini_val('open_basedir') != '' ) ) ? '' : 'enctype="multipart/form-data"';

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
	// Anti Bot Question Mod - Start
	if ($abq_config['abq_register'])
	{
		$abq_email_variable_name = $abq_config['email_variable_name'];
	}
	else
	{
		$abq_email_variable_name = 'email';
	}
	// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------------ 
# 
		// Anti Bot Question Mod - Start
		'L_ABQ_QUEST' => $abq_quest,
		'L_ABQ_EXPLAIN' => $lang['ABQ_F_explain_register'],
		'L_ABQ_HINWEIS' => sprintf($lang['ABQ_F_Probleme'], '<a href="mailto:' . $board_config['board_email'] . '">', '</a>'),
		'L_ABQ_QUESTION' => $lang['ABQ_F_Question'],
		'L_ABQ_ANSWER' => $lang['ABQ_F_YourAnswer'],
		'L_ABQ_ANSWER_EXPLAIN' => (($abq_CaseInfo) && (substr($abq_answerfield,0,7) != '<select')) ? '<br />'.$lang['ABQ_F_casesensitive'] : '',
		'S_ABQ' => $abq_answerfield, 
		// Anti Bot Question Mod - End

# 
#-----[ REPLACE WITH ]------------------------------------------------ 
# 
		// Anti Bot Question Mod - Start
		'S_ABQ_EMAIL' => $abq_email_variable_name,
		'L_ABQ_QUEST' => $abq_quest,
		'L_ABQ_EXPLAIN' => $lang['ABQ_RegisterForm_explain'],
		'L_ABQ_NOTE' => sprintf($lang['ABQ_Form_Problems'], '<a href="mailto:' . $board_config['board_email'] . '">', '</a>'),
		'L_ABQ_QUESTION' => $lang['ABQ_Form_Question'],
		'L_ABQ_ANSWER' => $lang['ABQ_Form_YourAnswer'],
		'L_ABQ_ANSWER_EXPLAIN' => (($abq_CaseInfo) && (substr($abq_answerfield,0,7) != '<select')) ? '<br />'.$lang['ABQ_Form_CaseSensitive'] : '',
		'S_ABQ' => $abq_answerfield, 
		// Anti Bot Question Mod - End

# 
#-----[ OPEN ]------------------------------------------ 
# 
language/lang_english/lang_admin.php

# 
#-----[ FIND ]------------------------------------------------ 
# 
// Anti Bot Question Mod - Start
$lang['ABQ_MOD'] = 'Anti Bot Question MOD';
// Anti Bot Question Mod - End

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
# EN: Delete
# DE: Lsche
# FR: Supprimez
# ES: Borrar
#


# 
#-----[ OPEN ]------------------------------------------------ 
# 
templates/subSilver/agreement.tpl

# 
#-----[ FIND ]------------------------------------------------ 
# 
				<td><span class="genmed"><br />{AGREEMENT}<br /><br /><br /><div align="center"><a href="{U_AGREE_OVER13}" class="genmed">{AGREE_OVER_13}</a><br /><br /><a href="{U_AGREE_UNDER13}" class="genmed">{AGREE_UNDER_13}</a><br /><br /><a href="{U_INDEX}" class="genmed">{DO_NOT_AGREE}</a></div><br /></span></td>

# 
#-----[ IN-LINE FIND ]------------------------------------------------ 
# 
<a href="{U_AGREE_OVER13}" class="genmed">

# 
#-----[ IN-LINE REPLACE WITH ]------------------------------------------------ 
# 
<a href="{U_AGREE_OVER13}" class="genmed" rel="nofollow">

# 
#-----[ IN-LINE FIND ]------------------------------------------------ 
# 
# EN:
#    Within the german version of phpBB.de this "IN-LINE FIND" doesn't exist because the COPPA was removed.
#    Ignore this "IN-LINE FIND" and the following "IN-LINE REPLACE WITH" if you use the german version without the COPPA.
# 
# DE:
#    In der deutschen Version von phpBB.de gibt es dieses "IN-LINE FIND" nicht, da die COPPA entfernt wurde.
#    Zusammen mit dem nachfolgenden "IN-LINE REPLACE WITH" kann es ignoriert werden, wenn die COPPA nicht nachtrglich wieder eingebaut wurde.
#
# FR:
#    Dans la version allemande de phpBB.de, cette instruction "IN-LINE FIND" est  ignorer car le COPPA a t supprim. 
#    Ignorez cette tape ainsi que la suivante ("IN-LINE REPLACE WITH") si vous utilisez une version allemande sans le COPPA.
#
# ES:
#    En la versin en alemn de phpBB.de este "IN-LINE FIND" no existe porque el COPPA fue eliminado. 
#    Ignora este "IN-LINE FIND" y el siguiente "IN-LINE REPLACE WITH" si utilizas la versin alemana.
#
<a href="{U_AGREE_UNDER13}" class="genmed">

# 
#-----[ IN-LINE REPLACE WITH ]------------------------------------------------ 
# 
<a href="{U_AGREE_UNDER13}" class="genmed" rel="nofollow">

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_footer.tpl

#
#-----[ FIND ]------------------------------------------
#
Powered by <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> &copy; 2001, 2005 phpBB Group<br />{TRANSLATION_INFO}</span></div>

#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN switch_abq_footer -->
<div align="center"><span class="copyright"><br>
{ABQ_FOOTER}
</span></div>
<!-- END switch_abq_footer -->

# 
#-----[ OPEN ]------------------------------------------ 
# 
templates/subSilver/posting_body.tpl

# 
#-----[ FIND ]------------------------------------------ 
# 
	  <td class="row1" valign="top"><span class="gen">{L_ABQ_QUESTION}:</span><br />
		<span class="gensmall">{L_ABQ_EXPLAIN2}</span></td>

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
	  <td class="row1" valign="top"><span class="gen">{L_ABQ_QUESTION}:</span></td>

# 
#-----[ OPEN ]------------------------------------------------ 
# 
templates/subSilver/profile_add_body.tpl

# 
#-----[ FIND ]------------------------------------------------ 
# 
		<td class="row2"><input type="text" class="post" style="width:200px" name="email" size="25" maxlength="255" value="{EMAIL}" /></td>

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
		<td class="row2"><input type="text" class="post" style="width:200px" name="{S_ABQ_EMAIL}" size="25" maxlength="255" value="{EMAIL}" /></td>

# 
#-----[ FIND ]------------------------------------------------ 
# 
		<td class="row1" colspan="2" align="center"><span class="gensmall">{L_ABQ_HINWEIS}</span></td>

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
		<td class="row1" colspan="2" align="center"><span class="gensmall">{L_ABQ_NOTE}</span></td>

# 
#-----[ OPEN ]------------------------------------------------ 
# 
templates/subSilver/admin/user_edit_body.tpl

# 
#-----[ FIND ]------------------------------------------------ 
# 
		<input class="post" type="text" name="email" size="35" maxlength="255" value="{EMAIL}" />

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
		<input class="post" type="text" name="{S_ABQ_EMAIL}" size="35" maxlength="255" value="{EMAIL}" />

# 
#-----[ SAVE/CLOSE ALL FILES ]-------------------------------- 
# 
# EoM 